﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Calculate
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("输入运算式：");
            string userInput = Console.ReadLine();
            DataTable dt = new DataTable();
            try
            {
                string really_data = dt.Compute(userInput, "false").ToString();
                Console.WriteLine("结果为:" + really_data);
            }
            catch (Exception)
            {
                Console.WriteLine("输入运算式有误，债见!");
            }
            Console.ReadLine();
        }
    }
}
